SELECT a. publication_id, 
       a .article as [Article Name], 
       c.article_id, 
       Count (c. article_id) AS Counts 
FROM   distribution.. msarticles a 
       INNER JOIN distribution.. msrepl_commands c 
               ON a. article_id = c .article_id 
--where a.publication_id=8 
GROUP  BY a.publication_id, 
          a. article, 
          c .article_id 
ORDER  BY a.article 